Typically, data is persistently stored in database tables. However, application programs often require datasets that have a more complex or a less complex hierarchical structure. For example, certain application programs may be unable to handle data of a particular format or may not be able to efficiently store a large volume of data. Accordingly, efficient storage of such hierarchical datasets in a database is needed.